package net.sky.oa.dao.shortmsg.impl;

import java.util.List;

import net.sky.oa.dao.SkyBaseDaoImpl;
import net.sky.oa.dao.shortmsg.SmsInfoDao;
import net.sky.oa.model.SmsInfo;

import org.springframework.stereotype.Repository;

@SuppressWarnings("unchecked")
@Repository
public class SmsInfoDaoImpl extends SkyBaseDaoImpl<SmsInfo>
		implements SmsInfoDao {

	public SmsInfoDaoImpl() {
		super.setPersistType(SmsInfo.class);
	}
	
	public List<SmsInfo> findByAccount(String account){
		String hql = "from SmsInfo d where d.account=?";
	    Object[] params = { account };
	    return findByHql(hql, params);
	}
	
	public List<SmsInfo> findByPort(String port){
		String hql = "from SmsInfo d where d.port=?";
		Object[] params = { port };
		return findByHql(hql, params);
	}
	
}
